/*
 * IAntennaControllerBridge.h
 *
 *  Created on: Dec 24, 2014
 *      Authors: Avihay Avitan & Stefan Farcas
 */

#ifndef IANTENNACONTROLLERBRIDGE_H_
#define IANTENNACONTROLLERBRIDGE_H_
#include "../Satellite/SatelliteAER.h"
#include "../GSLogger/Logger.h"
#include "../ProgressStatus/ProgressStatus.h"
using namespace ProgressStatusSpace;

#include "../utils/StringUtils.h"
#include "TimeStampUtils.h"

using namespace SatelliteNameSpace;
using namespace LoggerNameSpace;

namespace AntenaControllerSpace {

/**
 *  IAntennaControllerBridge defines the interface for connecting and sending directing commands to Antenna controllers
 * see [AntennaControllers] section in core.ini file
 */
class IAntennaControllerBridge {

public:
	IAntennaControllerBridge();
	virtual ~IAntennaControllerBridge();
	string getControllerName();
	bool isActive();

	/**
	 * connect to the external controller , returning true if succeeded
	 */
	virtual bool connect() = 0; 	// connects to antenna driver, returns true if successful.
	/**
	 * method to switch the controller state (ON/OFF) = (TRUE/FALSE)
	 */
	virtual void setIsActive(bool isActive) = 0;
	/**
	 * method to send direction command to controller, returns true if succeeded
	 */
	virtual bool pointAntennaTo(SatelliteAER*) = 0; 	// move antenna to position specified.


protected:
	string my_name;
	bool active; // controller is active only if successfully connected to driver.
	Logger *logger;
};

} /* namespace AntenaControllerSpace */

#endif /* IANTENNACONTROLLERBRIDGE_H_ */
